package com.interview.manytomany.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.interview.manytomany.entity.ManyOne;
import com.interview.manytomany.entity.ManyTwo;
import com.interview.manytomany.repository.ManyToManyRepository;

@Service
public class ManyToManyService {
	@Resource
	private ManyToManyRepository manyRepository;

	public List<ManyTwo> findTwoAll() {
		return manyRepository.findTwoAll();
	}

	public List findOneAll() {
		return manyRepository.findOneAll();
	}

	public ManyOne findOne(String id) {
		return manyRepository.findOne(id);
	}

	public void deleteOne(String id) {
		manyRepository.deleteOne(id);
	}

	public ManyOne saveOne(ManyOne manyOne) {
		return manyRepository.saveOne(manyOne);
	}

	public ManyOne updateOne(ManyOne manyOne) {
		return manyRepository.updateOne(manyOne);
	}

	public ManyTwo findTwo(String id) {
		return manyRepository.findTwo(id);
	}

	public void deleteTwo(String id) {
		manyRepository.deleteTwo(id);
	}

	public ManyTwo saveTwo(ManyTwo manyTwo) {
		return manyRepository.saveTwo(manyTwo);
	}

	public ManyTwo updateTwo(ManyTwo manyTwo) {
		return manyRepository.updateTwo(manyTwo);
	}

}
